package com.briup.security.web;

import com.briup.security.util.JwtUtil;
import com.briup.security.util.Result;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "账户管理")
@RequestMapping("/account")
public class AccountController {

    @PostMapping("/login")
    public void login(String username,String password) {
    }

    @GetMapping("/page")
    public Result<String> page() {
        return Result.fail(401,"该请求需要认证");
    }

//    @PostMapping("/success")
//    public Result<String> success(String username) {
//        return Result.success(JwtUtil.sign(username,null));
//    }
//
//
//    @PostMapping("/fail")
//    public Result<String> fail(String username) {
//        return Result.fail(401,"用户名密码错误");
//    }
}
